<template>
  <van-sidebar v-model="activeKey" style="width: 100%">
    <van-sidebar-item :title="item.dicKey" v-for="(item,index) in data" :key="index" @click="side(index,item.dicValue)"/>
  </van-sidebar>
</template>

<script>
export default {
  name: 'sidebar',
  props: {
    data: Array
  },
  data () {
    return {
      activeKey: 0
    }
  },
  methods: {
    side (index, val) {
      this.$emit('getItemListByCategoryAndType', val)
    }
  }
}
</script>
<style lang="less" scoped>
</style>
